From: Emilio Pozuelo Monfort Date: Tue, 25 Apr 2017 15:27:42 +0000 (+0200) Subject: extensionSystem: handle reloading broken extensions X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~359 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=ff425d1db7082e2755d2a405af53861552acf2a1;p=gnome-shell.git extensionSystem: handle reloading broken extensions Some extensions out there may fail to reload. When that happens, we need to catch any exceptions so that we don't leave things in a broken state that could lead to leaving extensions enabled in the screen shield. https://bugzilla.gnome.org/show_bug.cgi?id=781728 --- diff --git a/js/ui/extensionSystem.js b/js/ui/extensionSystem.js index a4dc29eea..fc352b895 100644 --- a/js/ui/extensionSystem.js +++ b/js/ui/extensionSystem.js @@ -282,12 +282,20 @@ function _onVersionValidationChanged() { // temporarily disable them all enabledExtensions = []; for (let uuid in ExtensionUtils.extensions) - reloadExtension(ExtensionUtils.extensions[uuid]); + try { + reloadExtension(ExtensionUtils.extensions[uuid]); + } catch(e) { + logExtensionError(uuid, e); + } enabledExtensions = getEnabledExtensions(); if (Main.sessionMode.allowExtensions) { enabledExtensions.forEach(function(uuid) { - enableExtension(uuid); + try { + enableExtension(uuid); + } catch(e) { + logExtensionError(uuid, e); + } }); } }